package com.ee.chat.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ee.chat.common.entity.UserImLimitLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper接口
 * </p>
 *
 * @author Shane
 * @since 2020-12-08
 */
public interface UserImLimitLogMapper extends BaseMapper<UserImLimitLog> {
    /**
     * 获取用户im限制列表
     * @param userId
     * @return
     */
    List<UserImLimitLog> selectByUserId(@Param("userId") Integer userId);

    /**
     * 清除限制
     * @param userId
     * @param type
     * @return
     */
    int deleteByType(@Param("userId") Integer userId, @Param("type") String type);

    /**
     * 获取限制信息
     * @param userId
     * @param type
     * @return
     */
    UserImLimitLog selectByType(@Param("userId") Integer userId, @Param("type") String type);
}